
#include "schedule.hpp"

Schedule::Schedule(){}

Schedule::Schedule(const Schedule& a){}

Schedule::~Schedule(){}

int Schedule::addEvent(Event *a){
	return 0;
}

int Schedule::addEvent(int x,string y){
	Event mule(x,y);

	eventList.insert(eventList.end(),mule);

	sort(eventList.begin(),eventList.end());

	return 0;
}

int Schedule::checkEvents(){

	for(unsigned int i=0;i<eventList.size();i++)
	{
		if(eventList.at(i).eventTimeExe < time(NULL))
		{
			cout << "Event #" << eventList.at(i).ID << " has expired!" << endl;
			cout << "   String was: \"" << eventList.at(i).eventCommand << "\"" << endl;

		}
	}
	return 0;
}
